MAIL v4.2 Installation and manager's manual (c) Peter Davey, 21 November, 1993. SECTION Page 1. Introduction 3 2. How to USE MAIL 4 2.1 A quick start 4 2.2 Running the program 4 2.3 The editor 5 2.4 The Mailbox 6 2.5 The Menu 6 2.6 Flags 9 2.7 Unread mail 10 3. How to INSTALL MAIL 11 3.1 The Program 11 3.2 The Directory 11 3.3 The Environment 11 3.4 Step by step - installing by numbers 12 4. Shareware Licensing 13 4.1 The package 14 4.2 Registration fees 14 4.3 Registering 15 5. Limits and Requirements 17 5.1 DOS version 17 5.2 BIOS 17 5.3 Number of users 17 5.4 User names 17 5.5 Defaults 17 5.6 Systems using 24 line displays 17 6. Application notes 19 6.1 Security 19 6.2 Use on a single machine 19 6.3 Maximum number of addressees 20 6.4 Lock files (Non-Novell networks only) 20 6.5 Error codes 21 6.6 The banner line 22 6.7 Using MAILSHOW.EXE 22 6.8 Backup programs 23 6.9 Multiple Novell servers 23 7. Release history 24 7.1 Released versions 24 7.2 Version numbers 24 7.3 Recent fixes 24 8. About the author 25 9. I N D E X 27 MAIL - the Network Electronic Mail Program 1. INTRODUCTION The notes in this document refer to MAIL version 4.2, a Shareware program by Peter Davey. MAIL is written for use on IBM compatible computers on a Novell network, but it uses generic methods of file access, so that it should work happily on any network running MSDOS or a fully compatible operating system. The purpose of the program is to provide simple messaging between users of a network - with the emphasis on simple. MAIL has the following features: * A simple menu with single key selection. * A personal mailbox for each user. * Messages of up to 23 lines, either typed into a simple full-screen editor, or read from a text file. * Messages may be sent to a single addressee or a list of addressees. DOS-style wildcard characters extend this ability. * A file may be attached to a message and transferred with it. * Messages can be copied to additional addressees, edited, printed or filed. * Automatic addressing of answers. * Distribution lists define frequently used groups of addressees. * Recipients can be made to answer or print out messages before deleting them. * A "recorded delivery" service is available. * A command line option allows a message from a text file to be sent to a list of addressees. * A command line option lets the program check whether there is new mail. * Help is available, DOS 5 style, with the /? parameter. The copyright of the program and documentation is retained by Peter Davey, and the version included here is ready for up to 15 users (see paragraph 5.3) for œ15. Please see Shareware Licensing (page 13) for full details. Electronic mail can only be properly installed on a network by the network manager, and it is assumed that the manager has a working knowledge of the operating system. Therefore, these notes are not written at the level of a novice, and no instruction is given on operating system commands. 3 MAIL v4.2 (c) Peter Davey 1993 2. HOW TO USE MAIL 2.1 A quick start To test out the program, try the following steps (or equivalent): ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ MD F:\PUBLIC\MAIL ³ ³ ³ ³ SET MAIL=F:\PUBLIC\MAIL ³ ³ ³ ³ SET ID=SUPERVIS ³ ³ ³ ³ MAIL ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ You will not actually be able to send any mail at this point, because the system will only know about the one addressee, "SUPERVIS", and you cannot send mail to yourself. However, you can explore the program, and the example shows how simple it is to use. NB: When logged on to a Novell network, the environment variable ID is not used as the program will use the user's login name. 2.2 Running the program 2.2.1 With no arguments The command MAIL displays the menu, together with the first unread message, if there is one. In the absence of an unread message, the message which was on screen last time the program quit is displayed. 2.2.2 With the ? argument The command MAIL ? operates as above, but only if there is unread mail. If there is no unread mail, the program quits, returning errorlevel 0. As long as unread mail exists, the next unread message is displayed, and a highlighted box at the top left of the screen shows how many more unread messages remain. 2.2.3 Sending a file from the command line The contents of a text file may be read in and sent as a message using the command line option. The syntax is MAIL FileName AddressList. FileName is the name of the file containing the text to be sent; AddressList is a list of addressees, separated by spaces. For example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ MAIL MYFILE.TXT FRED JIM SHEILA ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 4 MAIL v4.2 (c) Peter Davey 1993 would send the contents of MYFILE.TXT to addressees Fred, Jim and Sheila. Only the first 23 lines of the text file are sent. This command line option is intended for use in batch files to send pre-defined messages to users automatically. Note that it does not send the file itself, but reads the text of the file and sends it in the form of a message; the TRANSFER option, which sends a file of any type or size with an attached message, is not available from the command line. 2.2.4 With the /? switch The command MAIL /? displays a help screen. 2.2.5 The /D switch This changes the current directory while the program runs. This will be the default directory for saving messages using the FILE option, and when transferring files using the Transfer flag. e.g. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ MAIL /DC:\MYDIR ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The previous current directory is restored before the program quits. 2.3 The editor A full screen editor is used whenever a message or a distribution list is to be edited. The editor is very simple, and has a status line which shows what is being edited. It operates in insert mode, and the following keys may be used: ENTER - moves the cursor to a new line, inserting a line if the screen is not already full. Can be used to split lines. Backspace - deletes the character to the left of the cursor. Can delete a line break if the resultant joined line is shorter than the screen width. Delete - deletes the character under the cursor. Can delete a line break if the resultant joined line is shorter than the screen width. Arrow keys - Up, Down, Left, Right. Home - beginning of line. End - end of line. CTRL-Y - deletes the line containing the cursor. CTRL-U - restores the last deleted line. The WordStar-style ^E ^S ^D ^X cursor keys may also be used. 5 MAIL v4.2 (c) Peter Davey 1993 2.4 The Mailbox A user's mailbox is created automatically when he or she first runs the program. All messages, both incoming and outgoing, are kept in the mailbox. When the program is run, the menu line is displayed at the top of the screen, above the current message. The messages are arranged in a circular list, so that continually selecting NEXT or BACK will cycle through them repeatedly. Messages may be left in the mailbox, or deleted as required, and so the mailbox acts as a sort of combined IN and PENDING tray. 2.5 The Menu The full menu line has fourteen options, but the menu is context sensitive, so only relevant options are displayed. Options are chosen by typing the first letter of the option, which is highlighted. In the explanations below, "Current message", means the message currently displayed, and "Sender" means the originator of the message or, if it was copied, the copier. 2.5.1 $dist Allows the creation or editing of a distribution list. When chosen, the user is prompted for the name of a distribution list. This may be up to seven characters, as the first character of a distribution list file is always $. The default name for a distribution list is $DIST. After the name is entered, the message editor is displayed, and the names of addressees for the distribution list may be typed in. There is no limit on the number of addressees in a distribution list, and repeated addresses will not cause duplicated messages to be sent. The format is free; the only stipulation is that names must be separated by spaces or new lines. A distribution list may contain the names of other distribution lists; this nesting may reach a depth of five. Blank lines are permitted, and comment lines may be entered, starting with a / character. For example: 6 MAIL v4.2 (c) Peter Davey 1993 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ / This is a distribution list ³ ³ ³ ³ / My friends: ³ ³ FRED JIM SHEILA ³ ³ ³ ³ / My boss: ³ ³ SIR ³ ³ ³ ³ / Another list that I want included ³ ³ $MYDIST ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 2.5.2 Answer A special case of SEND. This option creates a message addressed to the sender of the current message, and clears the Answer flag of the current message. Except for not asking the name of the addressee and the subject of the message, it is the same as the SEND option. 2.5.3 Back Displays the previous message. 2.5.4 Copy Allows the current message to be copied to other addressees. The prompts are the same as for the ANSWER option, but the message editor is not entered. 2.5.5 Delete Deletes the current message. 2.5.6 Edit Enters the editor with the current message, allowing additions or alterations to be made. The message may subsequently be copied to other addressees. 2.5.7 File Allows the current message to be saved to a text file. The user is prompted for the name of the file. This option will append to an existing file, or create a new file, as appropriate. Full pathnames are accepted, and no check is made that the file is of an appropriate type. 2.5.8 Help Enters the help menu, which allows seven screens of help information to be selected. 7 MAIL v4.2 (c) Peter Davey 1993 2.5.9 Kill For the Supervisor only. If the current user's ID (or Novell login name) is SUPERVIS, then this option is available to kill any mailbox. The supervisor might need this in order to remove the mailbox of a user who is no longer on the system. (MAIL truncates user names to 8 characters, so on a Novell Netware network, SUPERVISOR's mailbox name is SUPERVIS). 2.5.10 List Allows known addressees to be listed. The user is prompted for addressees, and DOS-style wildcards may be used. The first default is *, which gives a list of all addressees and distribution lists known to the system. For a given input line, LIST will show all the users who would be addressed if sending a message with the same line given as the addressee. Giving the name of a distribution list, e.g. $DIST, lists all the addresses defined in the list; likewise, $* lists not the names of the lists, but the combined contents of all distribution lists. On successive operations of LIST, the prompt will show the addressees previously listed. The line can then be edited to try something different. The purpose of this is so that if necessary, different combinations of wildcards can be tried out until the required users are listed. When subsequently using SEND, the same list of addressees is offered as a default. On a Novell system, users who are actually logged in at the time are listed in red. 2.5.11 Next Displays the next message. 2.5.12 Print Prints the current message to the default printer, and resets the Print flag of the current message. 2.5.13 Quit Quits the program, returning errorlevel 0. A check is first made for new mail, and if it is found the program does not quit, but displays the next unread message. 8 MAIL v4.2 (c) Peter Davey 1993 2.5.14 Send Creates a message and sends it to the nominated addressee. There are five stages to sending a message: 1. A prompt is given for the addressee. In reply to this, a list of addressees may be entered, e.g. Jim George Fred. DOS-style wildcards may be used in the list, as may the names of distribution lists. On a Novell network, the address ** means, "All users currently logged on". 2. A prompt is given for the subject of the message. The line entered is displayed at the foot of the message screen. 3. The message flags are displayed, and the user is invited to set them as appropriate. At this point, transferring a file or reading in from a text file may be selected. 4. If file transfer or reading in from file has been selected, the user is prompted for file names. These may be a full pathnames. 5. The editor is entered. When editing is finished, the message is sent. 2.5.15 Space Bar Pressing the space bar causes a check to be made for new mail. This check is also made automatically whenever the contents of the mailbox are changed by editing or sending messages. 2.6 Flags When creating or copying a message, flags can be attached to it to control certain features. Five flags are available, and are prompted for when the message is created or copied. 2.6.1 Answer If this flag is set, the recipients of a message will be unable to delete it unless they first send a reply, using the ANSWER option. 2.6.2 Immediate (Novell only) On a Novell network, flash messages can be sent to logged-on users, and displayed in a banner at the bottom of the screen. The Immediate flag causes a flash message to be sent to all logged-on recipients of a message telling them that an Immediate message has been sent. If there is only one addressee, then the Recorded Delivery flag is also set, and a flash message is returned to the sender at the moment that the message is read. (If you want to, you can send an Immediate, Recorded Delivery, message to any number of 9 MAIL v4.2 (c) Peter Davey 1993 users but this is not the default because you would be continually getting flash messages back). 2.6.3 Lock The Lock flag prevents a message from being edited or copied by its recipients. 2.6.4 Print The Print flag makes the recipients unable to delete the message until they have printed it using the PRINT option. 2.6.5 Recorded delivery If the Recorded delivery flag is set, an acknowledgement of receipt is returned to the sender of the message. The acknowledgement is sent at the moment that the message first appears on the recipient's screen. 2.7 Unread mail Whenever unread messages exist, a highlighted box at the top left of the screen shows how many unread messages remain. While the box is displayed, the BACK option is not available on the menu, and the NEXT option will always move to the next unread message. Although messages may be left in the mailbox as long as the user wishes, old mail is usually left for a purpose, e.g. pending action. To prevent old messages being overlooked, any message over 60 days old is flagged as unread; that is, it will start to appear as a new message each time MAIL is called. If it is actually required to be kept in the mailbox, then the message date may be reset simply by selecting EDIT, and then pressing Escape without making any changes. The message can then remain for another 60 days before once more being brought to the user's attention. 10 MAIL v4.2 (c) Peter Davey 1993 3. HOW TO INSTALL MAIL 3.1 The Program Only one executable program is involved, named MAIL.EXE or MAIL286.EXE. It is not sensitive to where it is put, as long as it can be executed by any user who needs access to E-mail, so your DOS or UTILITY directory could be a good place. You do not need to copy any other files onto your system to make MAIL work. 3.2 The Directory A directory must be made for the mail, and it is best that it should be used exclusively by mailbox files, so simply create an empty directory. You should not put the program or documentation files in here; in fact don't copy any files into the mail directory, but leave creation of files to the program itself. All the users' mailboxes, distribution lists, transferred files and the locking semaphores will be held in this directory, so you should arrange for users of the mail system to have Read / Write / Open / Create / Delete rights. The mailbox files are text files, with each message terminated by a Form Feed. This allows direct printing out - but you may find the message headers rather telegraphese. The name of a mailbox file is the same as the first eight characters of its user's ID (or Novell login name). Mailbox files are hidden, since many users have access to the directory; this prevents casual snooping. There has been no attempt to prevent users from hacking into each others mailboxes if they are well enough versed in DOS to find the hidden files. Transferred files have hidden and system attributes. They are named using the DOS function which creates a unique temporary file name. Once a transferred file has been delivered to its addressee, its temporary file is deleted. 3.3 The Environment Mail makes use of two environment variables. The variable MAIL points to the mailbox directory. The variable ID is the user's unique name, which is not needed if your network is Novell Netware. Each user should have a different ID because it is used to create the user's mailbox in the mailbox directory. The best way to arrange this is to set the environment variable in each user's login script (or the equivalent on your network). If you have a Novell network, the program will discover the user's name without needing an environment variable. 11 MAIL v4.2 (c) Peter Davey 1993 Since it is used to create a file, only the first 8 characters of the user ID are significant. I'm sorry about this limitation, but it is fundamental to the simplicity of the system. When I first wrote the program, my network was still in the planning stages, and so our user IDs were created with the limitation in mind. It is a good idea to keep the pathname of the mail directory short and sweet so as not to use up too much valuable environment space. That is why I suggest you put it close to the root. 3.4 Step by step - installing by numbers 3.4.1 The program Copy MAIL.EXE to a directory where all mail users can find it without trying too hard. Modify the users' PATH variable to point to it if you like. If all your machines have 286 or higher processors, install MAIL286.EXE instead, and rename it to MAIL.EXE. 3.4.2 The MAIL directory Make an empty mail directory, wherever is most appropriate on your system. On a Novell system, I would suggest SYS:EMAIL (because SYS:MAIL is a special Novell directory). On other systems, put it in the root of your main shared drive. 3.4.3 Access to the MAIL directory Ensure that the MAIL directory is shared as a resource over the network, and that all users who require it are able to attach/map to it or are attached automatically when they log on. They should have Read / Write / Open / Create / Delete rights. 3.4.4 The Environment Make sure that each user has the necessary environment variables. These would normally be set in the users' logon scripts. MAIL should point to the MAIL directory (F:\MAIL in this example), and ID (not required on Novell networks) should be the user's unique name. e.g. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ SET MAIL=F:\MAIL ³ ³ SET ID=GEORGE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 3.4.5 Running it Get all users to run the program. The best way to do this is to put the command: 12 MAIL v4.2 (c) Peter Davey 1993 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ MAIL ? ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ in their logon scripts, or in the loop of whatever menu system you use (you should be using mine!). Running the program the first time creates the user's empty mailbox, and subsequently each call with the ? argument will check for new mail, and exit if there is none. 3.4.6 Making users aware Let the users know that E-mail is available. Put the MAIL command on the appropriate menu, if you use a menu system. Arrange a way of running the MAIL ? command often (at least every time a user logs on) so that users are alerted to new messages (see paragraph 2.2.2). Systems that I set up are usually arranged to check for mail in this way each time an application quits back to the system menu. 4. SHAREWARE LICENSING I will not explain the whole Shareware thing. The world and his editor are writing reams of column inches about it now, so unless you are a Tibetan monk . . . The version distributed as shareware is for 15 users. See Limits and Requirements (page 17) for the physical limits, and the definition of a user. The registration fee for up to 15 users is œ15. There is no restriction on copying and distribution of the package, provided that all of the files listed below are distributed together on one disk, and that no charge is made (libraries may charge their usual copying fee). If you think the program is worth having, share it with others. I do, however, ask you to do the decent thing and send me the required fee. I will then send you a licensed copy, and put you on a mailing list for updates and support. Just as a reminder, the program will nag you occasionally if it finds that you are addressing more than the licensed number of users. How much it nags will depend on just how may users you address! The idea behind this is that you still have a fully working piece of software, and plenty of time to contact me for a registered upgrade. 13 MAIL v4.2 (c) Peter Davey 1993 4.1 The package The package consists of the files listed below. If the package is copied and handed on to other parties ALL OF THESE FILES are to be included: MAILREAD.ME Final release notes MAIL.EXE The executable file MAIL286.EXE A version compiled for 286 (and above) processors MAILSHOW.EXE Utility to un-hide files in the mail directory MAIL.DOC This document, in MS WORD 5.0 format MAIL.TXT This document, in ASCII format, with form feeds; printable using COPY MAIL.TXT PRN 4.2 Registration fees The registration fee in the table below is accepted in return for an exclusive licence to use the package for up to the number of addressees shown. I retain the copyright of the program and documentation, and ownership of the intellectual property rights inherent in them. By accepting your registration, I agree that you may keep copies of the program and documentation as required for use, and for back-up purposes, and you agree not to violate my copyright by selling the program whether separately or as part of a value added package, or reverse engineering the code for gain. Violation of these terms will render this agreement void, irrespective of what monies have been paid. ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Number ³ Charge ³ ³ of users ³ (No VAT) ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Up to 15 ³ œ15 ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Over 15 ³ œ1 per user ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Single PCs ³ œ5 each ³ ³ ³(minimum œ15)³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ I am not registered for VAT, so VAT is not payable on the fees above, nor can I provide a VAT invoice. 14 MAIL v4.2 (c) Peter Davey 1993 4.3 Registering You may register by sending the requisite fee to the following address. Cheques should be made payable to Peter Davey (Personal Computer Services). Peter Davey (Personal Computer Services) 5 Malvern Close Worthing Sussex. BN11 2HE 15 MAIL v4.2 (c) Peter Davey 1993 16 MAIL v4.2 (c) Peter Davey 1993 5. LIMITS AND REQUIREMENTS 5.1 DOS version The program runs under any networkable version of DOS - that is, version 3.1 or above. 5.2 BIOS Machines running MAIL should have an IBM-compatible BIOS. 5.3 Number of users The version of the program included here is licensed for 15 users (on payment of the registration fee), but compiled for up to 300 users. A user is defined as a mailbox or distribution list file in the MAIL directory, so you can have up to 300 files. Temporary files (which are used by the TRANSFER option) and .LOK files do not count. 5.4 User names The user name, as set in the environment variable ID or by Netware, has up to eight significant characters. Longer user names may be used, but they are truncated to a length of eight characters in order to create the mailbox files. 5.5 Defaults There is no default for the user name. If the program cannot find the user's name it will exit, returning errorlevel 2. (This can happen on a Novell system if you try to run MAIL while logged out). There is no default for the MAIL directory name. If the environment variable MAIL is not set, the program will exit, returning errorlevel 3. The default directory for transferring files, and saving messages using the FILE option, is the current directory. This default may be changed using the /D switch. 5.6 Systems using 24 line displays Some display adaptors give only 24 lines of text. The program does not make any allowance for this. The only difficulty likely to be experienced with these is that a full 23 line message will cause the screen to scroll up one line, losing its header underneath the menu line. If this is a serious problem, I can provide a version which limits messages to 22 lines. 17 MAIL v4.2 (c) Peter Davey 1993 18 MAIL v4.2 (c) Peter Davey 1993 6. APPLICATION NOTES 6.1 Security The system cannot be said to be secure, because although the mailbox files are hidden, they are in a directory in which all mail users have Read/Write/Create access. You may be able to get round this if your network system allows you to set individual file permissions such that other users can append to a file, but not read it. You could apply this protection to the mailbox of each user who particularly wants his mail to be private. If you try this successfully, please let me know, and I will add the details to this section. When you are experimenting with permissions on a non- Novell network, you should remember that all users must be able to create and delete the lock files (described below) when accessing mail. They also need to create temporary files which hold the contents of files transferred from user to user. Alternatively, if you are happy about security generally, but need to give attention to the privacy of mail for a particular group (say, Senior Management), you can use two different mail directories. Make a private directory accessible by the closed group only, and then set the environment variable MAIL to point to this directory for these users. They will then have their own closed mail group. The disadvantage of this approach is that if they also want access to the main mail directory they would have to quit the mail program, change the MAIL variable, and run the program again. This of course would be easily achieved under batch file or menu control. If I get enough feedback on this question, I might consider adding a closed group working feature to the program. 6.2 Use on a single machine Why is there a registration option for single machines? Well, in fact this program was originally written for use on a stand-alone machine, and the network file locking was added later. I was assisting some departments where each PC was shared by several users, who were mostly interested in doing their jobs and not in PCs. They wanted to make the machines easy to use, and so we installed a menu system, which I wrote because none of the available commercial or Shareware systems seemed to do exactly what we wanted. The menu system involves a logging-on screen, partially for security, but mostly so that it knows 19 MAIL v4.2 (c) Peter Davey 1993 which user in on and can display the right menus. Once we had a system which knew who was logged on to it, it seemed natural to add an E-mail package so that they could leave messages for each other. The network version of the mail program was not born until we planned to join all of these stand-alone PCs together. I still install mail on stand-alone machines - the idea isn't as daft as it sounds. 6.3 Maximum number of addressees Technically, the limit of 300 only shows when you are using wildcard addressing, or listing users. You can actually get away with as many users as you like as long as you do not try to address or list more than 300 of them in one go, although of course I would require you to register and receive a copy for the appropriate number. If you require more than 300 users, you will need an upgrade version from me. 6.4 Lock files (Non-Novell networks only) 6.4.1 Method of locking Files are locked by the creation of semaphore files. This is primitive, but has the advantage that it ensures compatibility even with networks which are not fully compatible with MS-DOS's low-level file locking functions. Lock files have the root name of their associated file, with the extension .LOK. The name of the user who created the lock is written to the lock file. Lock files are not usually visible in the mail directory, because they normally only exist for a fraction of a second. The exception is when a distribution list is being edited; in this case an associated lock will exist until editing is complete, and while it is in place no user can send a message using that distribution list. 6.4.2 Effect of system faults If lock files are left intact, due to system faults, they may be deleted without penalty. Individual lock files are also removed automatically when the owner of a locked mailbox tries to access his mail. This ensures that the system can continue to function normally if nobody has the expertise required to delete lock files by hand. 6.4.3 Dealing with spurious lock files When the program tries to access a file, it attempts to create the lock. If the lock already exists, the program retries 160 times. After the maximum number of retries, it reads the lock file to find out who owns it. If the lock is owned by the current user, 20 MAIL v4.2 (c) Peter Davey 1993 then it carries on, otherwise it gives up, unless it is accessing the user's own mailbox, in which case it ignores the lock, and then clears it when finished. In most circumstances, the program assumes that a lock is incorrect if it is over five minutes old, and it can then be cleared. If this is not the case, then the lock remains in force, and the associated file cannot be accessed. When a file is not accessed because of a lock, an error message shows who owns the lock. Using this information it can be seen how lock problems can be solved by users, even if they have no access to DOS to kill the lock files. Suppose that the mailbox of user Fred has been left locked by user Sheila; as a result, other users are unable to send mail to Fred. If Fred is available, he can unlock his mailbox simply by reading his mail. If he is unavailable, then Sheila can achieve the same result by sending a further message to Fred; since Sheila already owns the lock, she will be allowed in, and the lock will be correctly cleared afterwards. In the case of a distribution list, only the user who locked it can unlock it; this can be done by selecting the list for editing, using the $dist option. 6.5 Error codes Several error codes are returned in cases of abnormal termination. Two of these have been mentioned in paragraph 5.5. All are listed below. Errorlevel 1 is returned if the user's mailbox file cannot be opened. Errorlevel 2 is returned if environment variable ID is not set. Errorlevel 3 is returned if environment variable MAIL is not set. Errorlevel 4 is returned when the command line option is used, and the file to be sent does not exist, or is empty. Errorlevel 5 is returned when the command line option is used, and no valid addressee is given. Errorlevel 6 is returned when an invalid directory name is given with the /D switch. Errorlevel 7 is returned when an invalid command line switch character is given. 21 MAIL v4.2 (c) Peter Davey 1993 Errorlevel 8 is returned if, when quitting the program, it cannot write changes back to the mailbox because it is locked. Errorlevel 9 is returned when unable to close a mailbox file after attempting to write a message to it. This can happen if the operating system does not allow the file to be extended. It could be the result of a "Disk full" error; on a Novell system, it might be that the owner of the file has used up all of his allotted storage space. Whenever an errorlevel is returned, the program first displays an error message and pauses for it to be read. The error number given in the message is the same as the errorlevel returned. 6.6 The banner line At program start-up, when the mailbox is empty, the program displays a copyright line. Registered copies of the program may contain your own message if required. 6.7 Using MAILSHOW.EXE This utility clears the hidden and read-only attributes of mailbox files. Its purpose is to allow the system manager to manage unwanted mailboxes, and it may be used on single mailboxes, or the entire mail directory. The environment variable MAIL must exist. Notes: 1 Using the utility does not lock users out. If any user sends a message to a mailbox, the mailbox becomes hidden again. Bear in mind that on a live network this could happen at any moment. 2 If a user is given a new ID, his mailbox file may be renamed after being un-hidden by MAILSHOW. 6.7.1 In the mail directory The command MAILSHOW unhides all files in the mail directory, listing the pathname of each file. 6.7.2 On individual mailboxes Appending a user ID to the command makes it act on that ID alone, or a group of IDs if wildcards are used. For example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ MAILSHOW FRED ³ ³ MAILSHOW W* ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 22 MAIL v4.2 (c) Peter Davey 1993 6.8 Backup programs When using MAIL ? the mail program detects new mail because the archive flag of the mailbox is set. If you have backed up the directory containing E-mail, your backup program may have cleared the archive flags after backing up. It is thus possible that, although no mail has actually been lost, some users may not detect new mail if you have carried out a backup in between the time when the message was sent and the time the mailbox is checked. The work-around for this is either not to back up your mail directory, or to set your backup software (if possible) to leave the archive flags alone when backing up E-mail files. Since the files are hidden anyway, some backup programs may not touch them. 6.9 Multiple Novell servers There is no restriction that should prevent MAIL from being used on any network with multiple servers. However, because of the additional features of MAIL when used with Novell, a detail about Novell servers might be useful. Novell systems have a concept of Primary, Default and Preferred servers. The Primary server is usually the server that a workstation first attached to when it was started. The Default server is the server to which the current drive is mapped; if the current drive is local then the Default server is the Primary server. The Preferred server only exists if it has been specifically defined by an application program on a workstation. When a network request is made, it is sent to the Preferred server, if it has been defined, or otherwise to the Default server. When listing addressees, or sending to ** (which, on a Novell network, means "All users currently logged on"), MAIL makes network requests. These will be serviced by the Default server. Suppose that you have three servers, MAIN, ACCOUNTS and GRAPHICS. Each of your users are mapped to the MAIN server and one other. If a user in accounts runs MAIL and sends a message to **, the message will go to all the users who are logged in to his Default server, and which server that is will depend on what is his current drive. To avoid surprises it helps to ensure that users always have the appropriate current drive when using MAIL. This may be achieved either by logging on to a drive before running MAIL, or by running MAIL with the /D switch, giving the name of a drive and directory 23 MAIL v4.2 (c) Peter Davey 1993 which will become current while the program runs. The advantage of using /D is that the program then restores the previous current drive and directory before quitting. 7. RELEASE HISTORY 7.1 Released versions Version 3.4 of MAIL.COM was the first version of MAIL to have been generally released. Earlier versions were used only in-house, so if you have ever seen one it was probably an illegal copy. The shareware version has a banner which reads, "Mail (c) Peter Davey, November 1993. v4.2 15 users." Registered copies will be the same version, but may report a different number of users, and may have the user's company name or message added to the banner. If you see this, you will be looking at the same program, but not the shareware version. You are not authorised to copy and pass on non-shareware versions. 7.2 Version numbers I use version numbers as follows: The major version number is changed only with significant changes to the software, usually involving compatibility issues; e.g. files used with a new version may not work with older versions (although I always try to ensure compatibility the other way). In the case of the change from 3.xx to 4.xx the major changes were the addition of file transferring, which was a significant upgrade, and a change of compiler to Turbo Pascal 6.0. The first digit after the point usually designates small changes and additions that do not affect compatibility although they are useful upgrades. The most recent examples are the addition of Novell- specific features. A second digit after the point is used for minor cosmetic amendments and bug-fixes. 7.3 Recent fixes Version 4.2 This was released with two bug fixes. The first was to correct a problem that prevented the program working with networks that use SHARE.EXE. There had been a point where a file was opened twice in succession, to which SHARE objects. Thanks to Phil Dring at Wefco for helping me find this one. The 24 MAIL v4.2 (c) Peter Davey 1993 other bug was one which occasionally prevented file transfer working for no good reason. 8. ABOUT THE AUTHOR I am a network manager and have had a close working experience of several generations of desk-top computers over the years. I started my network experience in the early days installing and managing a RM Nimbus system, and moved on to Novell and Vines. I plan to put more low-cost Shareware utilities onto the market. These are programs that I wrote originally for use in-house, and so they will have to be checked over and manuals produced. I want to keep standards high, and I will always be grateful for feedback and constructive advice. Particularly, if you find a bug - let me know! A lot of work goes into the production of even the simplest program. When preparing this one for distribution, I thought it would be easy because it has already been used in-house for over four years, but in fact I found that I wanted to add various bits of polish. Getting the documentation prepared takes some time too! I like support to be of the highest quality, and I hope that if you experience problems I will be able to help. However, please remember my family - they like to see me sometimes. 25 MAIL v4.2 (c) Peter Davey 1993 9. I N D E X $DIST 6, 21 sending 9 listing 8 transfer 9 24 line displays 17 FileName 4 Access 12, 19, 20, 21 Files Acknowledgement 10 as released 14 Additions or alterations 7 in mail directory 17 Addressee 3, 4, 7, 9, 21 Flags 9 Addressees 3, 4, 7, 8, 9 Answer 7, 9 in distribution lists 6 Immediate 9 number of 6, 14, 20 Lock 10 AddressList 4 Print 8, 10 ANSWER 7 Recorded delivery 10 Application notes 19 Form Feed 11 Arguments 4 Help 3, 5 BACK 6, 10 screens 7 Back-up 14 Hidden files 11 Backup programs 23 ID 11, 12, 17 Banner 22 Immediate flag 9 Batch file 19 Licensed copy 13 Batch files 5 Limits and Requirements 13, BIOS 17 17 Closed mail group 19 List 4, 5, 6, 9 Command formats List of addressees 3 MAIL 4 Lock files 19, 20, 21 MAIL /? 5 spurious 20 MAIL /D 5, 23 Lock flag 10 MAIL ? 4 Login script 11 MAIL FileName AddressList MAIL 11, 12, 17 4 MAIL ? (see Command formats) Command line 3, 4, 5, 21 13 Copying fee 13 MAIL directory 12, 17, 20, Copyright 3, 14, 22 22 Current message 6, 7, 8 default name 17 Defaults 17 MAIL.EXE 11, 12, 14 Delete 5, 10, 19 MAIL286.EXE 14 Directory 11, 12, 19 Mailbox 3, 6, 11, 13, 17, Distribution list 20 19, 20, 21, 22 Distribution lists 3, 8, 9 files 19, 21 creating and editing 6 Mailing list 13 nesting 6 Menu 6 Documentation 3, 14 $dist 6 in ASCII format 14 Answer 7 DOS 3, 8, 9, 11, 17, 20, 21 Back 7 EDIT 10 Copy 7 Editor 3, 5, 6, 7, 9, 13 Delete 7 Environment 11, 12 Edit 7 variables 11, 12, 17 File 7 ID 4, 21 Help 7 MAIL 4, 19, 21, 22 Kill 8 Errorlevel 4, 8, 17 List 8 1-7 21 Next 8 8-9 22 Print 8 File Quit 8 locking 19, 20 permissions 19 Menu 6 Send 9 Space Bar 9 Menu line 6, 17 More than 300 users 20 Multiple Novell servers 23 Network 3, 11, 12, 19 version 20 New mail 3, 8, 13 NEXT 6, 10 Novell 3 Error 2 17 Error 9 22 Flash messages 9 listing users 8 MAIL directory 12 User ID 4, 11 Number of users 13, 17 Operating system 3 Originator 6 Pathnames 7 Physical limits 13 Print flag 10 Protection 19 Quit 8, 19 Recorded delivery 3 Recorded delivery flag 10 Registering 15 Registration fee 14 Registration fees 14 Restriction on copying 13 Reverse engineering 14 Rights 11, 12, 14 Security 19 Semaphore files 20 Send 5, 7, 9, 13 Sender 6, 7, 10 Shareware 3, 19, 24 Licensing 13 Significant characters 17 Single machine 19 Status line 5 Subject 7 Text file 3, 4, 5, 7, 9 The package 13, 14 Tibetan monk 13 Unread flagging old messages 10 Unread mail 4, 10 Unread messages 8 Upgrade 13, 20 User definition 17 names 17 VAT 14 Version of DOS 17 of MAIL 24 Wildcard 3, 8, 20 Wordstar 5